<link rel="stylesheet" href="/plug/up/css/jquery.fileupload-ui.css">
<div class="col-lg-12">
    <section class="panel">
        <header class="panel-heading">
            添加用户
        </header>
        <div class="panel-body">
            <div class="position-center">
                <form action="/index/user/user_deal_add"role="form" method="post" enctype="multipart/form-data">
                <div class="form-group">
                    <label for="exampleInputPassword1">标题</label>
                    <input name="title" type="text" value="重庆<?php echo date('Y-m-d').'上新';?>" class="form-control" id="exampleInputPassword1" placeholder="输入用户名">
                </div>
                 <div class="form-group">
                    <label for="exampleInputPassword1">关键词</label>
                    <input name="keywords" type="text" value="明星 美女 街拍" class="form-control" id="exampleInputPassword1" placeholder="输入用户名">
                </div>               
                <div class="form-group">
                    <label for="exampleInputPassword1">内容</label>
                    <input name="content" type="text" value="重庆<?php echo date('Y-m-d').'上新';?>" class="form-control" id="exampleInputPassword1" placeholder="输入联系人">
                </div>
                <div class="form-group">
                    <label for="exampleInputPassword1">来源</label>
                    <select name="source">
                        {volist name="data" id="vo"}
                        <option value="{$vo.id}">{$vo.name}</option>
                        {/volist}
                        <option value="0">其它</option>
                    </select>
                </div>
                
                <div class="form-group">
                    <label for="exampleInputPassword1">主题</label>
                    <select name="theme">
                        
                        <option value="1">街拍</option>
                        <option value="2">生活</option>
                        <option value="4">明星</option>                       
                    </select>
                </div>
                               
                <div class="form-group">
                    <label for="exampleInputPassword1">封面</label>
                    <input name="covers" type="file" value="" class="form-control" >
                </div> 
                <div class="form-group">
                    <!--dom结构部分-->
                    <div id="uploader-box">
                        <!--用来存放item-->
                        <div id="fileList" class="uploader-list"></div>

                        <span class="btn btn-success fileinput-button">
                            <i class="glyphicon glyphicon-plus"></i>
                            <span>Select files...</span>
                            <!-- The file input field used as target for the file upload widget -->
                            <input id="fileupload" type="file" name="files[]" multiple>

                        </span>
                    </div>

                </div>                                  
                <button type="submit" class="btn btn-info">Submit</button>
            </form>
            </div>

        </div>
    </section>
</div>
<script src="/plug/up/js/vendor/jquery.ui.widget.js"></script>
<!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
<script src="/plug/up/js/jquery.iframe-transport.js"></script>
<!-- The basic File Upload plugin -->
<script src="/plug/up/js/jquery.fileupload.js"></script>
<script type="text/javascript">
$(function(){
    'use strict';
    // Change this to the location of your server-side upload handler:
    var url = '/fileupload.php'//'/plug/up/fileupload.php';
    $('#fileupload').fileupload({
        url: url,
        dataType: 'json',
        done: function (e, data) {
            $.each(data.result.files, function (index, file) {
                //$('<p/>').text(file.name).appendTo('#files');
                var str='<p><input  type="text" name="images[]" value="'+file.url+'"></p>'
                $("#fileList").append(str)
            });
        },
        progressall: function (e, data) {
            var progress = parseInt(data.loaded / data.total * 100, 10);
            $('#progress .progress-bar').css(
                'width',
                progress + '%'
            );
        }
    }).prop('disabled', !$.support.fileInput)
        .parent().addClass($.support.fileInput ? undefined : 'disabled');
})

</script>